public class Text2 {
    public static boolean check(int n)
    {
        int sum = 0,tmp = n;
        while(tmp > 0)
        {
            int x = tmp % 10;
            sum += x * x * x;
            tmp /= 10;
        }
        if(sum == n) return true;
        else return false;
    }
    public static void printFl()
    {
        for(int i = 100; i <= 999; i++)
        {
            if(check(i))
                System.out.print(i + " ");
        }
    }
    public static void main(String[] args) {
        printFl();
    }
}
